﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="NewsListControl.ascx.vb" Inherits="LinhKienMayTinh.NewsListControl" %>
<%@ Import Namespace="LinhKienMayTinh.CommonMethods" %>
<div class="news-list">
<%
    If IsNothing(dsSource) = False AndAlso dsSource.Tables(0).Rows.Count > 0 Then
        Dim i As Integer = 0
        For Each row As Data.DataRow In dsSource.Tables(0).Rows
            i = i + 1
%>
    <a href="<%= ResolveUrl("~/kinh-nghiem-su-dung-do-go/" & row("LINK_NAME"))%>/" title="<%= Nz(row("TITLE"), "")%>">
    <div class="news-item">        
        <div class="news-item-image">            
            <img src="<%= ResolveUrl(Nz(row("IMG_LINK"), "")) %>" alt="<%= Nz(row("TITLE"), "")%>" title="<%= Nz(row("TITLE"), "")%>" />            
        </div>
        <div class="news-item-title">            
            <h3><%= Nz(row("TITLE"), "")%></h3>
        </div>
        <div class="news-item-ud-date">            
            <span><%= DirectCast(Nz(row("UD_DATE"), ""), DateTime).ToString("dd/MM/yyyy HH:mm")%></span>
        </div>
        <div class="news-item-summary">
            <span><%= Nz(row("SUMMARY"), "")%></span>
        </div>
    </div>
    </a>  
    <hr style="border: 1px solid #ddd !important;" />  
<%        
Next
Else
%>
<div style="text-align: center">
    <h3>Không có tin nào.</h3>
</div>
<%End If%>
</div>